*===============================================================================*
*																				*
*		THIS DO FILE PRODUCES ONLINE APPENDIX TABLE C16 						*
* 		IN LONDONO-VELEZ AND QUERUBIN											*
*		"THE IMPACT OF EMERGENCY CASH ASSISTANCE IN A PANDEMIC: EXPERIMENTAL 	* 
* 		EVIDENCE FROM COLOMBIA", REVIEW OF ECONOMICS AND STATISTICS				*
*																				*
*		LAST MODIFIED: 2021-02-02												*
*																				*
*===============================================================================*

	use 	"${datadir}/main.dta", clear
	
	eststo clear
		foreach o of varlist afsec2_hheq afsec4_hheq afsec5_hheq afsec6_1_hheq ///
		afsec6_2_hheq afsec6_3_hheq afsec6_4_hheq afsec6_5_hheq afsec6_6_hheq ///
		afsec6_7_hheq afsec6_8_hheq{
		local l`o' : variable label `o'
				if `"`l`o''"' == "" {
					local l`o' "`i'"
					}
		if "`o'"=="afsec2_hheq" | "`o'"=="afsec4_hheq" eststo, title("`l`o''"): reghdfe `o' treated $control_lin edu0 dem4 if fsec1<=2, abs(codmunicipio $control_fe) vce(robust)
		if "`o'"!="afsec2_hheq" & "`o'"!="afsec4_hheq" eststo, title("`l`o''"): reghdfe `o' treated $control_lin edu0 dem4, abs(codmunicipio $control_fe) vce(robust)
		estadd local MunFE = "X"
		estadd local Controls = "X"
		}
		estout using "OnlineAppendix/TC16.xls", replace ///
			cells(b(star fmt(3)) se(par(`"="("'`")""') fmt(3))) dropped(".") keep(treated) label ///
			stats(MunFE Controls N r2, labels("Municipality FE" "Baseline controls" "N" "R2") ///
			fmt(%9.0f %9.0f %9.0f %9.3f %9.3f)) starlevels(* 0.1 ** 0.05 *** 0.01)

		
		
	
